/*
 * @Author: zxh
 * @Email: 1271027008@qq.com
 * @Date: 2020-06-09 16:23:08
 * @Descripttion: 
 */ 
import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
import { encrypt } from "../../../assets/js/rsaEncrypt.js";

@Injectable({
  providedIn: 'root'
})
export class CenterManageService {

  constructor(
    private http: HttpClient
  ) { }

  //修改密码
  editPassword(data): Observable<any>{
    let _data = {
      newPass:encrypt(data.confirmNewPass),
      oldPass:encrypt(data.oldPass)
    }
    return this.http.post('/api/users/updatePass',_data).pipe()
  }
}
